package com.wm.abstractfactory;

/**
 * @ClassName: PhoneFactory
 * @Description: 手机工厂
 * @Author: WM
 * @Date: 2022/10/9 18:06
 */
public class PhoneFactory extends AbstractFactory {

    public Phone createPhone(String brand) {
        if ("Apple".equals(brand)) {
            return new PhoneApple();
        } else if ("HuaWei".equals(brand)) {
            return new PhoneHuaWei();
        }
        return null;
    }

    public Computer createComputer(String brand) {
        return null;
    }
}
